package com.cxs.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: CXS
 */
@RestController
public class TestController {


    @GetMapping("test")
    @PreAuthorize("hasAuthority('sys:query')")
    public String test() {
        return "ok";
    }

    @GetMapping("test2")
    @PreAuthorize("hasAuthority('ceo')")
    public String test2() {
        return "ok";
    }
}
